<!DOCTYPE html>
<html>
<head>
    <title>{$site_name}-添加产品-会员中心</title>
    <meta name="keywords" content="{$site_seo_keywords}" />
    <meta name="description" content="{$site_seo_description}">

    <style type="text/css">
        #two-con{
            width: 700px;
        }

        #two-con .control-label {
            float: left;
            width: 90px;
            padding-top: 5px;
            text-align: right;
        }
        #two-con input.span4{
            width: 200px;
        }
        #two-con select{
            height: 34px;
            line-height: 34px;
        }
        #two-con select.span4{
            width: 214px;
        }
        /*tips*/
        #two-con .help-inline {
            display: block;
            margin-bottom: -20px;
            *zoom: 1;
            font-size: 14px;
        }
        #two-con .controls {
            *display: inline-block;
            *padding-left: 20px;
            margin-left: 120px;
            *margin-left: 0
        }
    </style>
    <tc_include file="Public:head" />

</head>


<body class="body-white" id="top">
<tc_include file="Public:nav" />

<div class="container tc-main">
    <div class="row">
        <div class="span2">
            <tc_include file="Public:usernav"/>
        </div>
        <div class="span10">
            <ul class="nav nav-tabs">

                <li class="active"><a>更换卡号</a></li>
            </ul>
            <form class="form-horizontal" id="dd" action="{:leuu('User/Info/changecardnum')}">
                <div id="two-con">

                    <div class="control-group">
                        <label class="control-label" for="cardnum" style="width: 160px;"><span style="color: red;">*</span>原会员卡号:</label>
                        <div class="controls">
                            <input type="hidden" name="cardnum" value="{$cardnum}">
                            <input type="text" id="cardnum" disabled name="cardnum2" value="{$cardnum}" class="span4">
                            <span class="help-inline"></span>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="cardnum" style="width: 160px;"><span style="color: red;">*</span>请输入新会员卡号:</label>
                        <div class="controls" >
                            <input type="text" id="changednum"  name="changednum" value="" class="span4">
                            <span class="help-inline"></span>
                        </div>
                    </div>


                    <div class="control-group" style="margin-top: 50px;">
                        <label class="control-label" for=""></label>
                        <div class="controls">
                            <button class="btn btn-primary js-ajax-submit span4" type="button" style="margin-left: 0px" id="subbtn">保存</button>
                        </div>
                    </div>
                </div>


            </form>
        </div>



    </div>
    <tc_include file="Public:footer" />
</div>
<!-- /container -->
<tc_include file="Public:scripts" />
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.DIMAUB;
</script>

<script type="text/javascript">
    $('#subbtn').click(function() {

        $.post("{:leuu('User/Info/changecardnum')}",$('#dd').serialize(),function(data) {
            document.getElementById('subbtn').disabled=true;
            if(data.status == 1) {
                if(data.url) {
                    window.location.href=data.url;
                } else {
                    location.reload();
                }
            } else {
                alert(data.info);
                document.getElementById('subbtn').disabled=false;
            }
        })
    });



</script>
</body>
</html>